# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

pkgname=fcitx5-chewing
pkgver=5.1.1
pkgrel=1
pkgdesc="Chewing Wrapper for Fcitx5"
arch=('loong64' 'x86_64')
url="https://github.com/fcitx/fcitx5-chewing"
license=('GPL')
depends=('fcitx5' 'libchewing')
makedepends=('extra-cmake-modules' 'ninja')
source=("https://download.fcitx-im.org/fcitx5/fcitx5-chewing/fcitx5-chewing-$pkgver.tar.xz"{,.sig})
sha512sums=('48aeb1755c917fe931165f3f41cc175a22a76cf8a6d4be05e7eb6bbb0908225b2f6a99529943f773e7d0ed674dcdbf138e56e7b5962566a0f1219c3919039553'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

build(){
  cd $pkgname-$pkgver

  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib .
  ninja
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" ninja install
}
